|
|
@@ -143,14 +143,14 @@ def fill_ym():
|
143
|
143
|
ymd = str(o.ymd)
|
144
|
144
|
if len(ymd) == 8:
|
145
|
145
|
# 月销量统计
|
146
|
|
- ssi, _ = ConsumeSaleStatisticInfo.objects.select_for_update().get_or_create(
|
|
146
|
+ ssi, _ = ConsumeSaleStatisticInfo.objects.get_or_create(
|
147
|
147
|
brand_id=o.brand_id,
|
148
|
148
|
ymd=ymd[6],
|
149
|
149
|
)
|
150
|
150
|
ssi.num += 1
|
151
|
151
|
ssi.save()
|
152
|
152
|
# 年销量统计
|
153
|
|
- ssi, _ = ConsumeSaleStatisticInfo.objects.select_for_update().get_or_create(
|
|
153
|
+ ssi, _ = ConsumeSaleStatisticInfo.objects.get_or_create(
|
154
|
154
|
brand_id=o.brand_id,
|
155
|
155
|
ymd=ymd[4],
|
156
|
156
|
)
|
|
|
@@ -161,7 +161,7 @@ def fill_ym():
|
161
|
161
|
ymd = str(o.ymd)
|
162
|
162
|
if len(ymd) == 8:
|
163
|
163
|
# 月型号销量统计
|
164
|
|
- mssi, _ = ConsumeModelSaleStatisticInfo.objects.select_for_update().get_or_create(
|
|
164
|
+ mssi, _ = ConsumeModelSaleStatisticInfo.objects.get_or_create(
|
165
|
165
|
brand_id=o.brand_id,
|
166
|
166
|
model_id=o.model_id,
|
167
|
167
|
ymd=ymd[6],
|
|
|
@@ -170,7 +170,7 @@ def fill_ym():
|
170
|
170
|
mssi.num += 1
|
171
|
171
|
mssi.save()
|
172
|
172
|
# 年型号销量统计
|
173
|
|
- mssi, _ = ConsumeModelSaleStatisticInfo.objects.select_for_update().get_or_create(
|
|
173
|
+ mssi, _ = ConsumeModelSaleStatisticInfo.objects.get_or_create(
|
174
|
174
|
brand_id=o.brand_id,
|
175
|
175
|
model_id=o.model_id,
|
176
|
176
|
ymd=ymd[4],
|
|
|
@@ -183,14 +183,14 @@ def fill_ym():
|
183
|
183
|
ymd = str(o.ymd)
|
184
|
184
|
if len(ymd) == 8:
|
185
|
185
|
# 月销量统计
|
186
|
|
- ssi, _ = SaleStatisticInfo.objects.select_for_update().get_or_create(
|
|
186
|
+ ssi, _ = SaleStatisticInfo.objects.get_or_create(
|
187
|
187
|
brand_id=o.brand_id,
|
188
|
188
|
ymd=ymd[6],
|
189
|
189
|
)
|
190
|
190
|
ssi.num += 1
|
191
|
191
|
ssi.save()
|
192
|
192
|
# 年销量统计
|
193
|
|
- ssi, _ = SaleStatisticInfo.objects.select_for_update().get_or_create(
|
|
193
|
+ ssi, _ = SaleStatisticInfo.objects.get_or_create(
|
194
|
194
|
brand_id=o.brand_id,
|
195
|
195
|
ymd=ymd[4],
|
196
|
196
|
)
|